handle LNK virtual files only when VFS mode is not off
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 20 Jan 2025 16:05:56 +0000 (17:05 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 22 Jan 2025 10:17:41 +0000 (11:17 +0100)
should ensure lnk widnows shortcut files are not mistakenly handled as
virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/discovery.cpp

index ad23815a4451a23c052c3859bfcd8a058d58fb02..e2305a81ee114708606008fb004b48fa3e7e6db5 100644 (file)
@@ -1662,14 +1662,14 @@ void ProcessDirectoryJob::processFileFinalize(
         }
     }
 
-    if (_discoveryData->_syncOptions._vfs &&
+    if (_discoveryData->_syncOptions._vfs && _discoveryData->_syncOptions._vfs->mode() != OCC::Vfs::Off &&
         (item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
         item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
         !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) {
         item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA;
     }
 
-    if (_discoveryData->_syncOptions._vfs &&
+    if (_discoveryData->_syncOptions._vfs && _discoveryData->_syncOptions._vfs->mode() != OCC::Vfs::Off &&
         (item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
         item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
         FileSystem::isLnkFile((_discoveryData->_localDir + path._local)) &&